package com.wmc.sqltransformweb.pojo.response;

import com.wmc.sqltransformweb.utils.ResponseEnum;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;

/**
 * @auther wangmingchang
 * @date 2019/10/30 10:33
 */
@Getter
@Setter
@ToString
public class BaseResponse implements Serializable {

    private String status;
    private String message;
    private Object data;

    public BaseResponse() {
    }

    public BaseResponse(String status, String message) {
        this.status = status;
        this.message = message;
    }
    public BaseResponse(ResponseEnum responseEnum) {
        this.status = responseEnum.getStatus();
        this.message = responseEnum.getMessage();
    }
    public BaseResponse(ResponseEnum responseEnum, Object data) {
        this.status = responseEnum.getStatus();
        this.message = responseEnum.getMessage();
        this.data = data;
    }
}
